#!/usr/bin/python
# -*- coding: utf-8 -*-

import Ice, Glacier2, sys
Ice.loadSlice('HolaMundo.ice', ['-I' '/usr/share/slice'])
import Demo

class Client (Ice.Application):
    def run (self, argv):
        self.shutdownOnInterrupt()
        router = Glacier2.RouterPrx.checkedCast(self.communicator().getDefaultRouter())
        session = router.createSession('david', 'david')
        obj = self.communicator().stringToProxy('holaMundo')
        prx = Demo.HolaMundoPrx.uncheckedCast(obj)        
        prx.saludar('david')
        self.communicator().waitForShutdown()
	return 0

Client().main(sys.argv, 'client.cfg')
